From 1bdd6532380b03beb96ec559ea38d6cda6fc1c06 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Mon, 10 Mar 2008 12:19:35 +0000 Subject: [PATCH] (Finsert_file_contents): Don't make CCL program to append "CCL: Quitted" when the decoding is quitted, but just signal `quit'. --- src/fileio.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/fileio.c b/src/fileio.c index 769a719191e..124e107ac74 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -4632,8 +4632,19 @@ actually used. */) { if (CODING_MAY_REQUIRE_DECODING (&coding)) { + if (coding.type == coding_type_ccl) + coding.spec.ccl.decoder.quit_silently = 1; code_convert_region (PT, PT_BYTE, PT + inserted, PT_BYTE + inserted, &coding, 0, 0); + if (coding.type == coding_type_ccl) + coding.spec.ccl.decoder.quit_silently = 0; + if (coding.result == CODING_FINISH_INTERRUPT) + { + /* Fixme: It is better that we report that the decoding + was interruppted by the user, and the current buffer + contents doesn't reflect the file correctly. */ + Fsignal (Qquit, Qnil); + } inserted = coding.produced_char; } else -- 2.30.2